package com.test.p02simplefactory.example01;

/**
 * 苹果
 * @author bcc
 */
public class Apple implements Fruit {

    /**
     * 树龄
     */
    private int treeAge;

    @Override
    public void plant() {
        log("Apple has bean planted");
    }

    @Override
    public void grow() {
        log("Apple is growing ...");
    }

    @Override
    public void harvest() {
        log("Apple has been harvested.");
    }

    public static void log(String msg){
        System.out.println(msg);
    }

    public int getTreeAge() {
        return treeAge;
    }

    public void setTreeAge(int treeAge) {
        this.treeAge = treeAge;
    }
}
